package com.yc.chaoshi.cs_manage.mapper;

import com.yc.chaoshi.entity.PmsFenlei1;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xz
 * @since 2022-08-04
 */
public interface PmsFenlei1Mapper extends BaseMapper<PmsFenlei1> {

//    @Select("select * from pms_fenlei1 WHERE aname LIKE CONCAT('%', #{aname}, '%') " +
//            " LIMIT #{page},#{size}")

    List<PmsFenlei1> selectfenlei1(@Param("aname")String aname,
                                   @Param("page")int page,
                                   @Param("size") int size);

    @Delete("delete from pms_fenlei1 where aid=#{aid}")
    Long deletefenlei1(@Param("aid") int aid);

    @Insert("insert into pms_fenlei1 values(default,#{aname},#{display},#{des})")
    Long insertfenlei1(@Param("aname") String aname,
                     @Param("display") int display,
                     @Param("des") String des);

    @Update("update pms_fenlei1 set aname=#{aname},display=#{display}, des=#{des}where aid=#{aid}")
    Long updatefenlei1(@Param("aname") String aname,
                     @Param("display") int display,
                     @Param("des") String des,
                     @Param("aid") int aid);

}
